home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ffffnnnnmmmmaaaattttcccchhhh((((3333GGGG)))) ffffnnnnmmmmaaaattttcccchhhh((((3333GGGG))))
-
-
-
- NNNNAAAAMMMMEEEE
- _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh - match filename or pathname
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh_...._hhhh_>>>>
- _iiii_nnnn_tttt _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_pppp_aaaa_tttt_tttt_eeee_rrrr_nnnn_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_tttt_rrrr_iiii_nnnn_gggg_,,,, _iiii_nnnn_tttt _ffff_llll_aaaa_gggg_ssss_))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh compares the string specified by the _s_t_r_i_n_g argument against the
- pattern specified by the _p_a_t_t_e_r_n argument.
-
- The _f_l_a_g_s argument modifies the interpretation of _p_a_t_t_e_r_n and _s_t_r_i_n_g. It
- is the bitwise inclusive OR of zero or more of the flags defined in the
- header _<<<<_ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh_...._hhhh_>>>>. If the FNM_PATHNAME flag is set in _f_l_a_g_s, then a
- slash character in _s_t_r_i_n_g will be explicitly matched by a slash in
- _p_a_t_t_e_r_n; it will not be matched by either the asterisk or question-mark
- special characters, nor by a bracket expression. If the FNM_PATHNAME
- flag is not set, the slash character is treated as an ordinary character.
-
- A backslash (`_\\\\') is used as an escape character in pattern strings. If
- FNM_NOESCAPE is not set in _f_l_a_g_s, a backslash character (_\\\\) in _p_a_t_t_e_r_n
- followed by any other character will match that second character in
- _s_t_r_i_n_g. In particular, (_\\\\_\\\\) will match a backslash in _s_t_r_i_n_g. If
- FNM_NOESCAPE is set, a backslash character will be treated as an ordinary
- character.
-
- If FNM_PERIOD is set in _f_l_a_g_s, then a leading period in _s_t_r_i_n_g will match
- a period in _p_a_t_t_e_r_n. The location of ''leading'' is indicated by the
- value of FNM_PATHNAME.
-
- If FNM_PATHNAME is set, a period is ''leading'' if it is the first
- character if _s_t_r_i_n_g.
-
- If FNM_PATHNAME is not set, a period is ''leading'' only if it is the
- first character of _s_t_r_i_n_g.
-
- If FNM_PERIOD is not set, then no special restrictions are placed on
- matching a period.
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- If _s_t_r_i_n_g matches the pattern specified by _p_a_t_t_e_r_n, then _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh returns
- zero. If there is no match, _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh returns FNM_NOMATCH, which is
- defined in the header _<<<<_ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh_...._hhhh_>>>>. If an error occurs, _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh returns
- another non-zero value.
-
- AAAAPPPPPPPPLLLLIIIICCCCAAAATTTTIIIIOOOONNNN UUUUSSSSAAAAGGGGEEEE
- _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh has two major uses. It could be used by an application or
- utility that needs to read a directory and apply a pattern against each
- entry. The _ffff_iiii_nnnn_dddd utility is an example of this. It can also be used by
- the _pppp_aaaa_xxxx utility to process its _p_a_t_t_e_r_n operands, or by applications that
- need to match strings in a similar manner.
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ffffnnnnmmmmaaaattttcccchhhh((((3333GGGG)))) ffffnnnnmmmmaaaattttcccchhhh((((3333GGGG))))
-
-
-
- The name _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh is intended to imply _ffff_iiii_llll_eeee_nnnn_aaaa_mmmm_eeee match, rather than
- _pppp_aaaa_tttt_hhhh_nnnn_aaaa_mmmm_eeee match. The default action of this function is to match
- filenames, rather than pathnames, since it gives no special significance
- to the slash character. With the FNM_PATHNAME flag, _ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh does match
- pathnames, but without tilde expansion, parameter expansion, or special
- treatment for period at the end of a filename.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- glob(3g), wordexp(3g), _<<<<_ffff_nnnn_mmmm_aaaa_tttt_cccc_hhhh_...._hhhh_>>>>.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-